import qs from 'qs'
import { axios as request  } from '@/utils/request'

export function getList({params}) {
  delete params.pageNo
  delete params.pageSize
  return request({
    url: 'api/site?' + qs.stringify(params, {indices: false, encode: false}),
    method: 'get'
  })
}

export function get({id}) {
  return request({
    url: `api/site/${id}`,
    method: 'get'
  })
}

export function add({data}) {
  return request({
    url: 'api/site',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: `api/site/${id}`,
    method: 'delete'
  })
}

export function edit({data}) {
  return request({
    url: 'api/site',
    method: 'put',
    data
  })
}

export function userAwardBaseList() {
  return request({
    url: `api/award-setting/userAwardBase/list`,
    method: 'get'
  })
}

export function userAwardBaseAdd(data) {
  return request({
    url: 'api/award-setting/userAwardBase/add',
    method: 'post',
    data
  })
}
export function userAwardBaseEdit(data) {
  return request({
    url: 'api/award-setting/userAwardBase/edit',
    method: 'post',
    data
  })
}

export function userAwardBaseDelete(data) {
  return request({
    url: 'api/award-setting/userAwardBase/delete',
    method: 'post',
    data
  })
}


export function getAccount(data) {
  return request({
    url: '/getAccount',
    method: 'post',
    data
  })
}